﻿--HEADER remove BenchmarkId from SecurityUnderlyingSeries

DELETE FROM [ANalytics].[InvestmentSecurityUnderlyingSerie]

GO

DELETE FROM [Analytics].[InvestmentBenchmarkUnderlyingSerie]

GO

ALTER TABLE [ANalytics].[InvestmentSecurityUnderlyingSerie]
ADD CONSTRAINT FK_InvestmentSecurityUnderlyingSerie_Investment FOREIGN KEY ([InvestmentId]) REFERENCES [Analytics].[Investment]([Id]) ON DELETE CASCADE

GO

ALTER TABLE [ANalytics].[InvestmentBenchmarkUnderlyingSerie]
ADD CONSTRAINT FK_InvestmentBenchmarkUnderlyingSerie_Investment FOREIGN KEY ([InvestmentId]) REFERENCES [Analytics].[Investment]([Id]) ON DELETE CASCADE